package com.example.demo.service.ServiceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.bean.Pinglun;
import com.example.demo.mapper.PinglunMapper;
import com.example.demo.service.PinglunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;
import java.util.List;

/**
 * @author liaoxh
 * @create 2021-06-21-11:51
 */
@Service
public class PinglunServiceImpl extends ServiceImpl<PinglunMapper,Pinglun> implements PinglunService{
    @Autowired
    PinglunService pinglunService;
    @Override
    public List<Pinglun> getByPictureId(Integer id) {
        QueryWrapper<Pinglun> wrapper = new QueryWrapper();
        wrapper.eq("pictureId", id);
        List<Pinglun> list = pinglunService.list(wrapper);
        return list;
    }
}
